package com.share.design.decorate;

/**
 * author:caifan
 * date:2020/2/4
 */
public class Decorator implements Sourceable {
    private Sourceable sourceable;

    public Decorator(Sourceable sourceable) {
        this.sourceable = sourceable;
    }

    @Override
    public void method() {
        System.out.println("decorate before");
        sourceable.method();
        System.out.println("decorate after");
    }
}
